<template>
	<view class="wrap-item flex align-center just-between row-item" v-if="item">
		<view class="title-bg f-30 flex">
			<view class="must" v-if="item.require">*</view>

			<view class="title">{{ item.title }}</view>
		</view>

		<input
			class="input f-30 text-right"
			:placeholder="item.place"
			placeholder-class="place"
			:type="item.mode === undefined ? 'text' : item.mode"
			:maxlength="item.maxlength === undefined ? '-1' : item.maxlength"
			:value="value"
			@input="$emit('input', $event.detail.value)"
			:disabled="item.disabled === undefined ? false : item.disabled"
		/>
	</view>
</template>

<script>
	export default {
		props: {
			/**
			 * 输入框的值
			 */
			value: {
				type: String,
				default: "",
			},
			/**
			 * 数据
			 */
			item: {
				type: Object,
				default: null,
			},
		},
	};
</script>

<style>
	@import "@/css/publish.css";
</style>
